package com.lemi.entity;

import com.lemi.common.base.entity.BaseEntity;
import lombok.Data;

import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.List;

@Data
@Table(name = "sys_menu")
public class Menu extends BaseEntity {

    private String menuName;
    private String menuUrl;
    private String menuIcon;
    private String menuLevel;
    private String keywords;
    private Integer menuOrder;
    private String parentId;
    private Integer status;

    //-------------
    @Transient
    private List<Menu> childMenus;

    @Transient
    private Integer type;//0 目录，1 菜单，2按钮

    public Menu() {
    }

    public Menu(Integer id,String menuName, String parentId) {
        this.setId(id);
        this.menuName = menuName;
        this.parentId = parentId;
    }
}
